import request from '@/utils/request'
import {Ref, UnwrapRef} from "vue";
import {useUserStore} from "@/store/user";

export const getUserList = (currentPage: Ref<UnwrapRef<number>, UnwrapRef<number> | number>, pageSize: Ref<UnwrapRef<number>, UnwrapRef<number> | number>) => {
    return request({
        url: '/home/userList',
        method: 'post',
        data: {
            currentPage,
            pageSize,
            sortField: "id",
            sortOrder: "ascend"
        }
    })
}

export const loveType = () => {
    const userStore = useUserStore()
    return request({
        url: '/home/love',
        method: 'post',
        data: {
            id: userStore.id,
            tags: [...userStore.tags]
        }
    })
}
